package com.itheima.test;

import com.tanhua.autoconfig.template.AipFaceTemplate;
import com.tanhua.server.AppServerApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = AppServerApplication.class)
public class FaceTest2 {
    @Autowired
    private AipFaceTemplate aipFaceTemplate;


    @Test
    public void test(){

        String url ="https://project-of-tanhua.oss-cn-hangzhou.aliyuncs.com/2022/10/14/23b8482e-4034-40ca-8874-14bdbd68960e.jpg";
        boolean result = aipFaceTemplate.checkFace(url);
        System.out.println("图片中是否有人脸："+result);
    }
}
